Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b27b7814 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "devfreq: check if get_dev_status is implemented before calling it"

parents 3fdd9ddc 3df8429b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -71,6 +71,10 @@ extern int devfreq_update_status(struct devfreq *devfreq, unsigned long freq);

static inline int devfreq_update_stats(struct devfreq *df)
{
	return df->profile->get_dev_status(df->dev.parent, &df->last_status);
	if (df->profile->get_dev_status)
		return df->profile->get_dev_status(df->dev.parent,
							 &df->last_status);
	else
		return -ENODEV;
}
#endif /* _GOVERNOR_H */