]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/st7571-i2c: Fix IS_ERR() vs NULL checks in probe()
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 30 Apr 2025 08:03:46 +0000 (11:03 +0300)
committerJavier Martinez Canillas <javierm@redhat.com>
Wed, 30 Apr 2025 12:51:40 +0000 (14:51 +0200)
commitb389df0f6b5a2e0655e9f101af97d75e35fb874c
tree405f602c670e49b04881f0e927403bc7c98eaa4d
parent0d607a59a0f6593e72630854a8bcb8b01b8dce40
drm/st7571-i2c: Fix IS_ERR() vs NULL checks in probe()

The devm_kzalloc() function returns NULL on failure, not error pointers.
Also printing an error message for kmalloc() failures is against kernel
style so just return -ENOMEM without printing a message.  (Kmalloc
already prints a message).

Fixes: 4b35f0f41ee2 ("drm/st7571-i2c: add support for Sitronix ST7571 LCD controller")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/aBHZYgPPPYY-J8Vd@stanley.mountain
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
drivers/gpu/drm/tiny/st7571-i2c.c