Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1435862
| From | Julia Lawall <julia.lawall@lip6.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] Input-at32psif: Remove OOM messages in psif_probe() |
| Date | 2016-07-02 21:30 +0200 |
| Message-ID | <rQyM1-7se-11@gated-at.bofh.it> (permalink) |
| References | <qEuGl-43C-5@gated-at.bofh.it> <rQysF-7lA-1@gated-at.bofh.it> <rQysF-7lA-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, 2 Jul 2016, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 2 Jul 2016 20:34:18 +0200
>
> Delete two debug messages because Linux will usually provide
> an appropriate information for a memory allocation failure.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/input/serio/at32psif.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c
> index fcb769a..b30503d 100644
> --- a/drivers/input/serio/at32psif.c
> +++ b/drivers/input/serio/at32psif.c
> @@ -210,15 +210,13 @@ static int __init psif_probe(struct platform_device *pdev)
> int ret;
>
> psif = kzalloc(sizeof(struct psif), GFP_KERNEL);
> - if (!psif) {
> - dev_dbg(&pdev->dev, "out of memory\n");
> + if (!psif)
> return -ENOMEM;
> - }
> +
Why add a blank line here?
> psif->pdev = pdev;
>
> io = kzalloc(sizeof(struct serio), GFP_KERNEL);
> if (!io) {
> - dev_dbg(&pdev->dev, "out of memory\n");
> ret = -ENOMEM;
> goto out_free_psif;
> }
> --
> 2.9.0
>
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] Input-at32psif: Fine-tuning for OOM handling in psif_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-02 21:10 +0200
[PATCH 2/2] Input-at32psif: Remove OOM messages in psif_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-02 21:10 +0200
Re: [PATCH 2/2] Input-at32psif: Remove OOM messages in psif_probe() Julia Lawall <julia.lawall@lip6.fr> - 2016-07-02 21:30 +0200
[PATCH 1/2] Input-at32psif: Return directly after a failed kzalloc() in psif_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-02 21:10 +0200
Re: [PATCH 0/2] Input-at32psif: Fine-tuning for OOM handling in psif_probe() Joe Perches <joe@perches.com> - 2016-07-02 22:50 +0200
Re: [PATCH 0/2] Input-at32psif: Fine-tuning for OOM handling in psif_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-03 10:10 +0200
csiph-web