diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2018-02-02 17:24:57 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2023-06-07 14:11:23 +0200 |
commit | 6b3b21a8542fd2fb6ffc61bc13b9419f0c58ebad (patch) | |
tree | f6833d3d5ad520865d27be4f0bb660da17868b43 /drivers/i2c/busses/i2c-tiny-usb.c | |
parent | 1ebafd5f5caaece1d25556cfb3a8f7fcb7629550 (diff) | |
download | lwn-6b3b21a8542fd2fb6ffc61bc13b9419f0c58ebad.tar.gz lwn-6b3b21a8542fd2fb6ffc61bc13b9419f0c58ebad.zip |
i2c: Delete error messages for failed memory allocations
These issues were detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-tiny-usb.c')
-rw-r--r-- | drivers/i2c/busses/i2c-tiny-usb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-tiny-usb.c b/drivers/i2c/busses/i2c-tiny-usb.c index 7279ca0eaa2d..d1fa9ff5aeab 100644 --- a/drivers/i2c/busses/i2c-tiny-usb.c +++ b/drivers/i2c/busses/i2c-tiny-usb.c @@ -226,10 +226,8 @@ static int i2c_tiny_usb_probe(struct usb_interface *interface, /* allocate memory for our device state and initialize it */ dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (dev == NULL) { - dev_err(&interface->dev, "Out of memory\n"); + if (!dev) goto error; - } dev->usb_dev = usb_get_dev(interface_to_usbdev(interface)); dev->interface = interface; |