From patchwork Fri Nov 26 17:06:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasiliy Kulikov X-Patchwork-Id: 359322 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAQH80D4031361 for ; Fri, 26 Nov 2010 17:08:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755391Ab0KZRGu (ORCPT ); Fri, 26 Nov 2010 12:06:50 -0500 Received: from mail-ew0-f46.google.com ([209.85.215.46]:42343 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755395Ab0KZRGt (ORCPT ); Fri, 26 Nov 2010 12:06:49 -0500 Received: by mail-ew0-f46.google.com with SMTP id 5so1069559ewy.19 for ; Fri, 26 Nov 2010 09:06:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer; bh=BRk80dB07Tv6/7LCz6uy3zbym2sX851Ww7Uxp7RjOaY=; b=dHVmSZSR5vh0ypTq874a+Nk5afGyDJwH61aKCke47iRpmEa5zDGhjukHkNeI8iom8+ ODRrPPQPMT1inuaj/94+QpdYjJqx0ivLkh7zsQD8zprApFmiAgPGl6nlQVMu2e/iGbCQ +qkpbsUUld3Jt9NqE/z0SyyKPE/gkNVpn7s04= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=WIeBjNNm5ATPtxr+VHeyLYj1fxHUPKtb4xyfvWPRe5dzImABuRJe+MuwxYZUb6QNqO H2t2ydk+dO4H4Diou6k2/KG/OzEKpwcv3DuMl3LEj2bbDyDk+vy6COub+DMpSqA6z3nC XfsUNL7kvjSKJJXrpUCt09YgdwqIsB4FPIIRg= Received: by 10.213.26.79 with SMTP id d15mr6479297ebc.35.1290791207627; Fri, 26 Nov 2010 09:06:47 -0800 (PST) Received: from localhost (ppp91-78-210-29.pppoe.mtu-net.ru [91.78.210.29]) by mx.google.com with ESMTPS id w20sm1918471eeh.12.2010.11.26.09.06.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 26 Nov 2010 09:06:46 -0800 (PST) From: Vasiliy Kulikov To: kernel-janitors@vger.kernel.org Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: rc: lirc_dev: check kobject_set_name() result Date: Fri, 26 Nov 2010 20:06:41 +0300 Message-Id: <1290791203-21448-1-git-send-email-segoon@openwall.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 26 Nov 2010 17:08:01 +0000 (UTC) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 8418b14..0a2d267 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -178,7 +178,9 @@ static int lirc_cdev_add(struct irctl *ir) cdev_init(cdev, &lirc_dev_fops); cdev->owner = THIS_MODULE; } - kobject_set_name(&cdev->kobj, "lirc%d", d->minor); + retval = kobject_set_name(&cdev->kobj, "lirc%d", d->minor); + if (retval) + return retval; retval = cdev_add(cdev, MKDEV(MAJOR(lirc_base_dev), d->minor), 1); if (retval)