From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966091AbcIHJt2 (ORCPT ); Thu, 8 Sep 2016 05:49:28 -0400 Received: from mga02.intel.com ([134.134.136.20]:16545 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966047AbcIHJtK (ORCPT ); Thu, 8 Sep 2016 05:49:10 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,300,1470726000"; d="scan'208";a="1036978013" Message-ID: <1473328146.11323.92.camel@linux.intel.com> Subject: Re: [PATCH 1/1] intel-mid: Fix sfi get_platform_data() return value issues From: Andy Shevchenko To: sathyanarayanan.kuppuswamy@linux.intel.com, wharms@bfs.de Cc: dan.carpenter@oracle.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, david.a.cohen@linux.intel.com Date: Thu, 08 Sep 2016 12:49:06 +0300 In-Reply-To: <71e4231f-33dc-9a95-c748-89bc5ec322d5@linux.intel.com> References: <1473210255-227672-1-git-send-email-sathyanarayanan.kuppuswamy@linux.intel.com> <1473250509.11323.60.camel@linux.intel.com> <71e4231f-33dc-9a95-c748-89bc5ec322d5@linux.intel.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2016-09-07 at 17:04 -0700, sathyanarayanan kuppuswamy wrote: > --- a/arch/x86/platform/intel-mid/sfi.c > > > +++ b/arch/x86/platform/intel-mid/sfi.c > > > @@ -335,9 +335,12 @@ static void __init sfi_handle_ipc_dev(struct > > > sfi_device_table_entry *pentry, > > >    > > >    pr_debug("IPC bus, name = %16.16s, irq = 0x%2x\n", > > >    pentry->name, pentry->irq); > > > + > > >    pdata = intel_mid_sfi_get_pdata(dev, pentry); > > > - if (IS_ERR(pdata)) > > > + if (IS_ERR(pdata)) { > > > + pr_err("ipc_device: %s: invalid platform data\n", > > > pentry->name); > > >    return; > > > + } > > This is actually needs more work. We have duplication in sfi.c and > > platform_ipc.c. > Yes. But platform_ipc.c implements custom ipc handler for audio ipc  > device. Even though there are duplications between custom handler and  > generic handler in sfi.c, I think its bit early to optimize this. I  > think we should revisit this once we have one more implementation of  > custom ipc handler. Definitely it's out of scope for now. -- Andy Shevchenko Intel Finland Oy