diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2018-02-02 21:21:12 +0100 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2018-03-19 16:31:07 +0100 |
commit | e3d7fbab062b877b96c09ffb43733502cdc1bd0a (patch) | |
tree | 16480e86724f63b94a788da227d48c7f9725dd4a /drivers/hsi | |
parent | HSI: ssi_protocol: fix spelling mistake: "trigerred" -> "triggered" (diff) | |
download | linux-e3d7fbab062b877b96c09ffb43733502cdc1bd0a.tar.xz linux-e3d7fbab062b877b96c09ffb43733502cdc1bd0a.zip |
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>
Diffstat (limited to 'drivers/hsi')
-rw-r--r-- | drivers/hsi/clients/hsi_char.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/hsi/clients/hsi_char.c b/drivers/hsi/clients/hsi_char.c index cf9c2a332ad8..9d2a6d64dfb8 100644 --- a/drivers/hsi/clients/hsi_char.c +++ b/drivers/hsi/clients/hsi_char.c @@ -697,10 +697,9 @@ static int hsc_probe(struct device *dev) int i; cl_data = kzalloc(sizeof(*cl_data), GFP_KERNEL); - if (!cl_data) { - dev_err(dev, "Could not allocate hsc_client_data\n"); + if (!cl_data) return -ENOMEM; - } + hsc_baseminor = HSC_BASEMINOR(hsi_id(cl), hsi_port_id(cl)); if (!hsc_major) { ret = alloc_chrdev_region(&hsc_dev, hsc_baseminor, |