mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
drm/imagination: Fix IS_ERR() vs NULL bug in pvr_request_firmware()
The pvr_build_firmware_filename() function returns NULL on error. It
doesn't return error pointers.
Fixes: f99f5f3ea7 ("drm/imagination: Add GPU ID parsing and firmware loading")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/384288de-a779-46c7-869d-b3c63462e12b@moroto.mountain
This commit is contained in:
parent
03219a3aa6
commit
9ee33dc477
|
|
@ -286,8 +286,8 @@ pvr_request_firmware(struct pvr_device *pvr_dev)
|
|||
|
||||
filename = pvr_build_firmware_filename(pvr_dev, "powervr/rogue",
|
||||
PVR_FW_VERSION_MAJOR);
|
||||
if (IS_ERR(filename))
|
||||
return PTR_ERR(filename);
|
||||
if (!filename)
|
||||
return -ENOMEM;
|
||||
|
||||
/*
|
||||
* This function takes a copy of &filename, meaning we can free our
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user