diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-04-25 04:17:06 -0400 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2017-06-08 07:21:43 -0400 |
commit | 4e3b9baa2f798a6cc9865d451269251378067f3a (patch) | |
tree | f0b1dddc76550ea99295e928df21f97530e12792 | |
parent | 1be0593f05e25d56a8f65586ea6d9afa601743bc (diff) |
HSI: nokia-modem: Delete error messages for a failed memory allocation in two functions
The script "checkpatch.pl" pointed information out like the following.
WARNING: Possible unnecessary 'out of memory' message
Thus remove such statements here.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
-rw-r--r-- | drivers/hsi/clients/nokia-modem.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/hsi/clients/nokia-modem.c b/drivers/hsi/clients/nokia-modem.c index f6c97a0e1fcd..a774ca7839e1 100644 --- a/drivers/hsi/clients/nokia-modem.c +++ b/drivers/hsi/clients/nokia-modem.c | |||
@@ -104,10 +104,8 @@ static int nokia_modem_gpio_probe(struct device *dev) | |||
104 | 104 | ||
105 | modem->gpios = devm_kcalloc(dev, gpio_count, sizeof(*modem->gpios), | 105 | modem->gpios = devm_kcalloc(dev, gpio_count, sizeof(*modem->gpios), |
106 | GFP_KERNEL); | 106 | GFP_KERNEL); |
107 | if (!modem->gpios) { | 107 | if (!modem->gpios) |
108 | dev_err(dev, "Could not allocate memory for gpios\n"); | ||
109 | return -ENOMEM; | 108 | return -ENOMEM; |
110 | } | ||
111 | 109 | ||
112 | modem->gpio_amount = gpio_count; | 110 | modem->gpio_amount = gpio_count; |
113 | 111 | ||
@@ -156,10 +154,9 @@ static int nokia_modem_probe(struct device *dev) | |||
156 | } | 154 | } |
157 | 155 | ||
158 | modem = devm_kzalloc(dev, sizeof(*modem), GFP_KERNEL); | 156 | modem = devm_kzalloc(dev, sizeof(*modem), GFP_KERNEL); |
159 | if (!modem) { | 157 | if (!modem) |
160 | dev_err(dev, "Could not allocate memory for nokia_modem_device\n"); | ||
161 | return -ENOMEM; | 158 | return -ENOMEM; |
162 | } | 159 | |
163 | dev_set_drvdata(dev, modem); | 160 | dev_set_drvdata(dev, modem); |
164 | modem->device = dev; | 161 | modem->device = dev; |
165 | 162 | ||