diff options
| author | Enric Balletbo i Serra <enric.balletbo@collabora.com> | 2019-03-13 13:22:53 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-24 08:21:07 +0100 |
| commit | 4039b5dd0f6712c9c4e7ea4e4199c75f52a9ccbb (patch) | |
| tree | a402f610f10ae12928c76bea575ea78aaaf31f78 /drivers/base/module.c | |
| parent | 903cfafe087452e080cea6e30439e7052d1198b6 (diff) | |
PM / devfreq: Fix static checker warning in try_then_request_governor
[ Upstream commit b53b0128052ffd687797d5f4deeb76327e7b5711 ]
The patch 23c7b54ca1cd: "PM / devfreq: Fix devfreq_add_device() when
drivers are built as modules." leads to the following static checker
warning:
drivers/devfreq/devfreq.c:1043 governor_store()
warn: 'governor' can also be NULL
The reason is that the try_then_request_governor() function returns both
error pointers and NULL. It should just return error pointers, so fix
this by returning a ERR_PTR to the error intead of returning NULL.
Fixes: 23c7b54ca1cd ("PM / devfreq: Fix devfreq_add_device() when drivers are built as modules.")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/base/module.c')
0 files changed, 0 insertions, 0 deletions
