Logging an error when kmalloc fails is not necessary (and in general
should be avoided) because the malloc failure will already complain
loudly itself.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210217102501.31758-3-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
        lis3->reg_cache = kzalloc(max(sizeof(lis3_wai8_regs),
                                     sizeof(lis3_wai12_regs)), GFP_KERNEL);
 
-       if (lis3->reg_cache == NULL) {
-               printk(KERN_ERR DRIVER_NAME "out of memory\n");
+       if (lis3->reg_cache == NULL)
                return -ENOMEM;
-       }
 
        mutex_init(&lis3->mutex);
        atomic_set(&lis3->wake_thread, 0);