HSI: hsi_char: Delete an error message for a failed memory allocation in hsc_probe()
Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>hifive-unleashed-5.1
parent
852041d1ce
commit
e3d7fbab06
|
@ -697,10 +697,9 @@ static int hsc_probe(struct device *dev)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
cl_data = kzalloc(sizeof(*cl_data), GFP_KERNEL);
|
cl_data = kzalloc(sizeof(*cl_data), GFP_KERNEL);
|
||||||
if (!cl_data) {
|
if (!cl_data)
|
||||||
dev_err(dev, "Could not allocate hsc_client_data\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
hsc_baseminor = HSC_BASEMINOR(hsi_id(cl), hsi_port_id(cl));
|
hsc_baseminor = HSC_BASEMINOR(hsi_id(cl), hsi_port_id(cl));
|
||||||
if (!hsc_major) {
|
if (!hsc_major) {
|
||||||
ret = alloc_chrdev_region(&hsc_dev, hsc_baseminor,
|
ret = alloc_chrdev_region(&hsc_dev, hsc_baseminor,
|
||||||
|
|
Loading…
Reference in New Issue