Commit b389df0
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: 4b35f0f ("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>1 parent 0d607a5 commit b389df0
1 file changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
911 | | - | |
912 | | - | |
913 | | - | |
| 911 | + | |
| 912 | + | |
914 | 913 | | |
915 | 914 | | |
916 | 915 | | |
917 | 916 | | |
918 | | - | |
919 | | - | |
920 | | - | |
| 917 | + | |
| 918 | + | |
921 | 919 | | |
922 | 920 | | |
923 | 921 | | |
| |||
0 commit comments