From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752230AbbKVRBI (ORCPT ); Sun, 22 Nov 2015 12:01:08 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:33920 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751711AbbKVRBG (ORCPT ); Sun, 22 Nov 2015 12:01:06 -0500 From: Sudip Mukherjee To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, Sudip Mukherjee Subject: [PATCH 1/3] staging: most: fix error comparison Date: Sun, 22 Nov 2015 22:30:54 +0530 Message-Id: <1448211656-15829-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org device_create() returns ERR_PTR on error, it does not return NULL. Signed-off-by: Sudip Mukherjee --- drivers/staging/most/mostcore/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c index ed1ed25..07f11dd 100644 --- a/drivers/staging/most/mostcore/core.c +++ b/drivers/staging/most/mostcore/core.c @@ -1936,7 +1936,7 @@ static int __init most_init(void) class_glue_dir = device_create(most_class, NULL, 0, NULL, "mostcore"); - if (!class_glue_dir) + if (IS_ERR(class_glue_dir)) goto exit_driver; most_aim_kset = -- 1.9.1