Omit an extra message for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
sm = kzalloc(sizeof(struct sm501_devdata), GFP_KERNEL);
if (sm == NULL) {
- dev_err(&dev->dev, "no memory for device data\n");
ret = -ENOMEM;
goto err1;
}
sm = kzalloc(sizeof(struct sm501_devdata), GFP_KERNEL);
if (sm == NULL) {
- dev_err(&dev->dev, "no memory for device data\n");
err = -ENOMEM;
goto err1;
}