Message ID | 1274127082-16288-2-git-send-email-nm@ti.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Kevin Hilman |
Headers | show |
diff --git a/arch/arm/plat-omap/opp.c b/arch/arm/plat-omap/opp.c index 229960d..0b61325 100644 --- a/arch/arm/plat-omap/opp.c +++ b/arch/arm/plat-omap/opp.c @@ -101,6 +101,10 @@ struct omap_opp * __deprecated opp_find_by_opp_id(enum opp_t opp_type, u8 __deprecated opp_get_opp_id(struct omap_opp *opp) { + if (unlikely(!opp || IS_ERR(opp)) || !opp->enabled) { + pr_err("%s: Invalid parameter being passed\n", __func__); + return 0; + } return opp->opp_id; }