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 <elfring@users.sourceforge.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
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;
}