Unverified Commit b389df0f authored by Dan Carpenter's avatar Dan Carpenter Committed by Javier Martinez Canillas
Browse files

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: 4b35f0f4 ("drm/st7571-i2c: add support for Sitronix ST7571 LCD controller")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/aBHZYgPPPYY-J8Vd@stanley.mountain


Signed-off-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
parent 0d607a59
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment