From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751604AbdKTXM7 (ORCPT ); Mon, 20 Nov 2017 18:12:59 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:36631 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751159AbdKTXM6 (ORCPT ); Mon, 20 Nov 2017 18:12:58 -0500 X-Google-Smtp-Source: AGs4zMZCE1cNYmaN3Ay3y/dqXukpSKt+s9kY6+glLvRVfHruHpJi8vGm7XNvlslZFRdgfiQ8oR1DKz6BUAjixT0TgfY= MIME-Version: 1.0 In-Reply-To: <8f5c59f4-1cbf-0198-663d-2410e3826579@xs4all.nl> References: <8f5c59f4-1cbf-0198-663d-2410e3826579@xs4all.nl> From: John Stultz Date: Mon, 20 Nov 2017 15:12:56 -0800 Message-ID: Subject: Re: [PATCHv2] drm: adv7511/33: Fix adv7511_cec_init() failure handling To: Hans Verkuil Cc: Arnd Bergmann , Bhumika Goyal , David Airlie , lkml , dri-devel@lists.freedesktop.org, Hans Verkuil , Laurent Pinchart , Dan Carpenter Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 20, 2017 at 12:57 PM, Hans Verkuil wrote: > If the device tree for a board did not specify a cec clock, then > adv7511_cec_init would return an error, which would cause adv7511_probe() > to fail and thus there is no HDMI output. > > There is no need to have adv7511_probe() fail if the CEC initialization > fails, so just change adv7511_cec_init() to a void function. In addition, > adv7511_cec_init() should just return silently if the cec clock isn't > found and show a message for any other errors. > > An otherwise correct cleanup patch from Dan Carpenter turned this broken > failure handling into a kernel Oops, so bisection points to commit > 7af35b0addbc ("drm/kirin: Checking for IS_ERR() instead of NULL") rather > than 3b1b975003e4 ("drm: adv7511/33: add HDMI CEC support"). > > Based on earlier patches from Arnd and John. > > Reported-by: Naresh Kamboju > Cc: Xinliang Liu > Cc: Dan Carpenter > Cc: Sean Paul > Cc: Archit Taneja > Cc: John Stultz > Link: https://bugs.linaro.org/show_bug.cgi?id=3345 > Link: https://lkft.validation.linaro.org/scheduler/job/48017#L3551 > Fixes: 7af35b0addbc ("drm/kirin: Checking for IS_ERR() instead of NULL") > Fixes: 3b1b975003e4 ("drm: adv7511/33: add HDMI CEC support") > Signed-off-by: Hans Verkuil > Tested-by: Hans Verkuil > --- > This rework of Arnd and John's patches goes a bit further and makes > cec_init a void function and just silently exits if there is no cec clock > defined in the dts. I'm sure that's the reason why the kirin board failed > on this. BTW: if the kirin board DOES support cec, then it would be nice > if it can be hooked up in the dts! > > Tested with my Dragonboard and Renesas Koelsch board. > > Change since my previous RFC PATCH: > > - added static inline adv7511_cec_init to avoid #ifdef in the probe function > as suggested by John Stultz. Thanks for adding the cleanup! Seems to work well on HiKey! Tested-by: John Stultz thanks -john