From: akpm@linux-foundation.org Subject: + drivers-rtc-rtc-ds1307c-release-irq-on-error.patch added to -mm tree Date: Thu, 19 Sep 2013 15:10:09 -0700 Message-ID: <523b7641.4PsTyXelW+TePc2L%akpm@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:57781 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752150Ab3ISWKK (ORCPT ); Thu, 19 Sep 2013 18:10:10 -0400 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: mm-commits@vger.kernel.org, jg1.han@samsung.com, sachin.kamat@linaro.org Subject: + drivers-rtc-rtc-ds1307c-release-irq-on-error.patch added to -mm tree To: sachin.kamat@linaro.org,jg1.han@samsung.com From: akpm@linux-foundation.org Date: Thu, 19 Sep 2013 15:10:09 -0700 The patch titled Subject: drivers/rtc/rtc-ds1307.c: release irq on error has been added to the -mm tree. Its filename is drivers-rtc-rtc-ds1307c-release-irq-on-error.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/drivers-rtc-rtc-ds1307c-release-irq-on-error.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/drivers-rtc-rtc-ds1307c-release-irq-on-error.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Sachin Kamat Subject: drivers/rtc/rtc-ds1307.c: release irq on error 'client->irq' was not released on error. Fix it. Signed-off-by: Sachin Kamat Cc: Jingoo Han Signed-off-by: Andrew Morton --- drivers/rtc/rtc-ds1307.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff -puN drivers/rtc/rtc-ds1307.c~drivers-rtc-rtc-ds1307c-release-irq-on-error drivers/rtc/rtc-ds1307.c --- a/drivers/rtc/rtc-ds1307.c~drivers-rtc-rtc-ds1307c-release-irq-on-error +++ a/drivers/rtc/rtc-ds1307.c @@ -956,7 +956,7 @@ read_rtc: GFP_KERNEL); if (!ds1307->nvram) { err = -ENOMEM; - goto exit; + goto err_irq; } ds1307->nvram->attr.name = "nvram"; ds1307->nvram->attr.mode = S_IRUGO | S_IWUSR; @@ -967,13 +967,15 @@ read_rtc: ds1307->nvram_offset = chip->nvram_offset; err = sysfs_create_bin_file(&client->dev.kobj, ds1307->nvram); if (err) - goto exit; + goto err_irq; set_bit(HAS_NVRAM, &ds1307->flags); dev_info(&client->dev, "%zu bytes nvram\n", ds1307->nvram->size); } return 0; +err_irq: + free_irq(client->irq, client); exit: return err; } _ Patches currently in -mm which might be from sachin.kamat@linaro.org are drivers-rtc-rtc-ds1307c-release-irq-on-error.patch drivers-rtc-rtc-isl1208c-remove-redundant-checks.patch drivers-rtc-rtc-max6900c-remove-redundant-checks.patch drivers-rtc-rtc-vt8500c-fix-return-value.patch drivers-rtc-rtc-at91rm9200c-use-devm_-apis.patch drivers-rtc-rtc-isl1208c-use-devm_-apis.patch drivers-rtc-rtc-sirfsocc-use-devm_rtc_device_register.patch drivers-rtc-rtc-cmosc-remove-redundant-dev_set_drvdata.patch drivers-rtc-rtc-mrstc-remove-redundant-dev_set_drvdata.patch drivers-rtc-rtc-vr41xxc-fix-checkpatch-warnings.patch linux-next.patch