Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932085Ab3CYOen (ORCPT ); Mon, 25 Mar 2013 10:34:43 -0400 Received: from mail-ee0-f43.google.com ([74.125.83.43]:51373 "EHLO mail-ee0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758386Ab3CYOem (ORCPT ); Mon, 25 Mar 2013 10:34:42 -0400 From: Alexandru Gheorghiu To: Liam Girdwood Cc: Mark Brown , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, Alexandru Gheorghiu Subject: [PATCH] sound: soc: Use PTR_RET function Date: Mon, 25 Mar 2013 16:33:59 +0200 Message-Id: <1364222039-6829-1-git-send-email-gheorghiuandru@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 915 Lines: 32 Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- sound/soc/soc-io.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c index 29183ef..8ca9ecc 100644 --- a/sound/soc/soc-io.c +++ b/sound/soc/soc-io.c @@ -158,10 +158,7 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, return -EINVAL; } - if (IS_ERR(codec->control_data)) - return PTR_ERR(codec->control_data); - - return 0; + return PTR_RET(codec->control_data); } EXPORT_SYMBOL_GPL(snd_soc_codec_set_cache_io); #else -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/