mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
misc: genwqe: fix return value check in genwqe_device_create()
In case of error, the function device_create_with_groups() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Frank Haverkamp <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
3c1547e774
commit
634608f27a
1 changed files with 2 additions and 2 deletions
|
|
@ -1306,8 +1306,8 @@ int genwqe_device_create(struct genwqe_dev *cd)
|
|||
genwqe_attribute_groups,
|
||||
GENWQE_DEVNAME "%u_card",
|
||||
cd->card_idx);
|
||||
if (cd->dev == NULL) {
|
||||
rc = -ENODEV;
|
||||
if (IS_ERR(cd->dev)) {
|
||||
rc = PTR_ERR(cd->dev);
|
||||
goto err_cdev;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue