From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752468AbcD3SkA (ORCPT ); Sat, 30 Apr 2016 14:40:00 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:37518 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751880AbcD3Sj7 (ORCPT ); Sat, 30 Apr 2016 14:39:59 -0400 Date: Sat, 30 Apr 2016 19:39:54 +0100 From: Sudip Mukherjee To: Alexandre Belloni Cc: Alessandro Zummo , linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com Subject: Re: [PATCH] rtc: stmp3xxx: check for failure Message-ID: <20160430183954.GD25043@sudip-laptop> References: <1460392435-23803-1-git-send-email-sudipm.mukherjee@gmail.com> <20160415210715.GF25196@piout.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160415210715.GF25196@piout.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 15, 2016 at 11:07:15PM +0200, Alexandre Belloni wrote: > Hi, > > On 11/04/2016 at 22:03:55 +0530, Sudip Mukherjee wrote : > > stmp3xxx_wdt_register() can fail as platform_device_alloc() or > > platform_device_add() can fail. Lets check for the return value from > > both platform_device_alloc() and platform_device_add() and return the > > error value accordingly which is now propagated from probe. > > > > Well, this may have been intentional. The RTC doesn't need the watchdog > driver to be present to work correctly. However, I agree that failing > silently is not nice. > > Did you have any particular issue? Maybe simply adding a dev_err() or > two would be fine. I didnot have any particular issue. I will send a new patch with some error message there. regards sudip